package com.warm.pump.module.skd.dao.gen;

import java.util.List;
import java.util.HashMap;
import java.util.Map;
import java.util.Date;
import java.math.BigDecimal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import com.warm.pump.frame.gen.bean.PageBean;
import com.warm.pump.frame.gen.util.TypeCast;
import com.warm.pump.frame.gen.exception.ServiceException;
import com.warm.pump.module.skd.bean.bo.gen.ScheduleWaitRunBo;
import com.warm.pump.module.skd.mapper.gen.ScheduleWaitRunBoMapper;
@Repository
public class ScheduleWaitRunBoDao  {
	// 日志对象
	private transient Log log = LogFactory.getLog(this.getClass());
	@Autowired
	private ScheduleWaitRunBoMapper scheduleWaitRunBoMapper;

	public Map getInstRunState(Map conditionMap){
		return scheduleWaitRunBoMapper.getInstRunState(conditionMap);
	}
	public Map getInstForRun(Map conditionMap){
		return scheduleWaitRunBoMapper.getInstForRun(conditionMap);
	}
	public Map getInstByIdForUpdate(Map conditionMap){
		return scheduleWaitRunBoMapper.getInstByIdForUpdate(conditionMap);
	}
    public List<Map<String,Object>>  getWaitRunInstDtl(Map conditionMap){
         return scheduleWaitRunBoMapper.getWaitRunInstDtl(conditionMap);
    }
    public PageBean getWaitRunInstDtlPage(Map conditionMap,int pageNo,int pageSize){
		Integer count = getWaitRunInstDtlCount(conditionMap);
		PageBean pageBean = new PageBean();
		pageBean.setCount(count);
		pageBean.setPageNo(pageNo);
		pageBean.setPageSize(pageSize);
		conditionMap.put("limitStart",pageBean.getStartNo());
		conditionMap.put("limitOffset",pageSize);
		pageBean.setData(scheduleWaitRunBoMapper.getWaitRunInstDtl(conditionMap));
		return pageBean;
    }
    public Integer getWaitRunInstDtlCount(Map conditionMap){
	    return scheduleWaitRunBoMapper.getWaitRunInstDtlCount(conditionMap);
    }
	public Map getInstDtlStatusNum(Map conditionMap){
		return scheduleWaitRunBoMapper.getInstDtlStatusNum(conditionMap);
	}
}
